You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SDK compliance workflow and local harness need to use SDK test harness release 0.8.0, with reusable GitHub workflow calls pinned to the release commit SHA instead of a mutable tag/branch. Running the updated harness exposed SDK/adapter compliance gaps in this repository.
Changes
Pins the reusable SDK compliance workflow to PostHog/posthog-sdk-test-harness commit be8b8d5a3f94a249659844e94832e874f049c1e4.\n- Uses ghcr.io/posthog/sdk-test-harness:0.8.0 for local Docker harness runs / workflow harness version inputs.\n- Updates SDK compliance adapter and/or SDK behavior needed to pass the 0.8.0 compliance contract.
Tests
SDK compliance Docker harness passed locally with project posthog_php_compliance.
sdk-harness-audit/posthog-php.md, line 232-234 (link)
PHPUnit suite left failing after merge
The audit file explicitly records vendor/bin/phpunit --colors=never test/ — exit 1; 18 failures and defers the fixes to a follow-up. The team's first simplicity rule is "Passes all the tests." The payload shape changes in Client.php (renamed api_key → token, always-present groups/person_properties/group_properties/geoip_disable, new flag_keys_to_evaluate) and the UUID generation fix will leave the exact-payload assertions in FeatureFlagTest.php, HttpClientTest.php, etc. in a broken state on main. Merging with a broken unit suite makes it harder to tell whether a future regression was introduced before or after this commit.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
sdk_compliance_adapter/adapter.php, line 795-799 (link)
/capture response UUID is always null
PHP passes arrays by value, so the uuid that Client::capture() assigns internally via normalizeMessageUuid() is never written back to the adapter's local $message variable. $message['uuid'] ?? null will therefore always be null. If the harness currently accepts null here this is harmless, but any future test that asserts a non-null UUID from /capture will fail silently.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The SDK compliance workflow and local harness need to use SDK test harness release 0.8.0, with reusable GitHub workflow calls pinned to the release commit SHA instead of a mutable tag/branch. Running the updated harness exposed SDK/adapter compliance gaps in this repository.
Changes
Tests